import http from './http';
// import type { AppointmentFormData } from '../types/appointment';

export const patientAPI = {
  // 登录
  login: (phone: string, password: string) => http.post('/patient/login', { phone, password }),

  // 注册
  register: (data: any) => http.post('/patient/register', data),

  // 获取个人预约
  getAppointments: () => http.get('/patient/appointments'),

  // 新建预约
  createAppointment: (data: any) => http.post('/patient/appointment', data),

  // 获取自己的病历列表
  getEMRList: () => http.get('/patient/emrs'),

  // 获取指定病历详情
  getEMRDetail: (emrId: string) => http.get(`/patient/emr/${emrId}`),

  // 其他如咨询相关API等也可在此添加
};
export type PatientAPI = typeof patientAPI;
